#include "stdafx.h"
#include <fstream>
#include "io_module.h"

namespace nnse
{
	// Constructor and Destructor

	io_module::io_module(const char* startup_file_name, const char* display_file_name, const char* errors_file_name, const char* results_file_name, const char* cin_file_name, const char* cout_file_name, const char* cerr_file_name)
	: startup_stream(startup_file_name), display_stream(display_file_name), errors_stream(errors_file_name), results_stream(results_file_name), cin_stream(cin_file_name), cout_stream(cout_file_name), cerr_stream(cerr_file_name)
	{
		startup_stream << "Constructing io_module" << std::endl;
	}

	io_module::~io_module()
	{
		startup_stream << "Destructing io_module" << std::endl;
		startup_stream.close();
		display_stream.close();
		errors_stream.close();
		results_stream.close();
		cin_stream.close();
		cout_stream.close();
		cerr_stream.close();
	}
}
